<div class="panel panel-default">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-2">
                <a href="/server/add" class="btn btn-primary">添加 Server</a>
            </div>
            <div class="col-md-3 col-md-offset-7">
                <form action="/server/list" method="get">
                    <div class="input-group">
                        <input class="form-control" name="keyword" type="text" value="{{.keyword}}" placeholder="名称/Token"/>
                        <span class="input-group-btn">
                          <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                        </span>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th class="w20p">名称</th>
                <th class="w20p">token</th>
                <th class="w13p">创建时间</th>
                <th class="w13p">修改时间</th>
                <th class="w15p">操作</th>
            </tr>
            </thead>
            <tbody>
            {{range $key, $serverValue := .serverValues}}
            <tr>
                <td>{{$serverValue.name}}</td>
                <td>{{$serverValue.token}}</td>
                <td class="center">{{dateFormat $serverValue.create_time "Y-m-d H:i:s"}}</td>
                <td class="center">{{dateFormat $serverValue.update_time "Y-m-d H:i:s"}}</td>
                <td class="center">
                    <a name="edit" class="glyphicon glyphicon-edit" href="/server/edit?server_id={{$serverValue.server_id}}">修改</a>
                    <a onclick="Common.confirm('确定要删除吗？', '/server/delete?server_id={{$serverValue.server_id}}')" class="glyphicon glyphicon-remove">删除</a>
                    <a onclick="Common.confirm('确定要重置token吗？', '/server/resetToken?server_id={{$serverValue.server_id}}')" class="glyphicon glyphicon-refresh">重置Token</a>
                </td>
            </tr>
            {{end}}
            </tbody>
        </table>
    </div>
    <div class="panel-footer">
        <div class="row">
            <div class="col-md-8 m-pagination" id="paginator">
            </div>
        </div>
    </div>
</div>